home *** CD-ROM | disk | FTP | other *** search
/ Champak 141 / (Vol 141) Oct 17 2011.iso / Games / despereaux-swings.swf / scripts / Box2D / Collision / b2Pair.as < prev    next >
Encoding:
Text File  |  2011-10-17  |  1.8 KB  |  80 lines

  1. package Box2D.Collision
  2. {
  3.    import Box2D.Common.b2Settings;
  4.    
  5.    public class b2Pair
  6.    {
  7.       
  8.       public static var e_pairFinal:uint = 4;
  9.       
  10.       public static var e_pairRemoved:uint = 2;
  11.       
  12.       public static var b2_nullPair:uint = b2Settings.USHRT_MAX;
  13.       
  14.       public static var e_pairBuffered:uint = 1;
  15.       
  16.       public static var b2_nullProxy:uint = b2Settings.USHRT_MAX;
  17.       
  18.       public static var b2_tableCapacity:int = b2Settings.b2_maxPairs;
  19.       
  20.       public static var b2_tableMask:int = b2_tableCapacity - 1;
  21.        
  22.       
  23.       public var userData:* = null;
  24.       
  25.       public var proxyId1:uint;
  26.       
  27.       public var proxyId2:uint;
  28.       
  29.       public var status:uint;
  30.       
  31.       public var next:uint;
  32.       
  33.       public function b2Pair()
  34.       {
  35.          userData = null;
  36.          super();
  37.       }
  38.       
  39.       public function SetBuffered() : void
  40.       {
  41.          status |= e_pairBuffered;
  42.       }
  43.       
  44.       public function IsBuffered() : Boolean
  45.       {
  46.          return (status & e_pairBuffered) == e_pairBuffered;
  47.       }
  48.       
  49.       public function IsFinal() : Boolean
  50.       {
  51.          return (status & e_pairFinal) == e_pairFinal;
  52.       }
  53.       
  54.       public function ClearRemoved() : void
  55.       {
  56.          status &= ~e_pairRemoved;
  57.       }
  58.       
  59.       public function SetFinal() : void
  60.       {
  61.          status |= e_pairFinal;
  62.       }
  63.       
  64.       public function IsRemoved() : Boolean
  65.       {
  66.          return (status & e_pairRemoved) == e_pairRemoved;
  67.       }
  68.       
  69.       public function ClearBuffered() : void
  70.       {
  71.          status &= ~e_pairBuffered;
  72.       }
  73.       
  74.       public function SetRemoved() : void
  75.       {
  76.          status |= e_pairRemoved;
  77.       }
  78.    }
  79. }
  80.